<template>
  <div>
    <van-tabbar v-model="active" @change="onChange" route>
      <van-tabbar-item icon="home-o" :to="{ name: 'Home' }">
        首页
      </van-tabbar-item>
      <van-tabbar-item icon="orders-o" :to="{ name: 'type' }">
        分类
      </van-tabbar-item>
      <van-tabbar-item icon="tv-o" :to="{ name: 'ca8' }">视频</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o" url="#/">购物车</van-tabbar-item>
      <van-tabbar-item icon="manager-o" url="#/">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data: function () {
    return {
      active: 0
    }
  },
  methods: {
    onChange: function (index) {
      // console.log(index)
      // this.active = index
      // console.log(this.active)
    }
  }
}
</script>

<style lang="less" scoped>
.van-tabbar {
  margin: 0 10px;
  width: 95%;
}
</style>
